package cn.dt70.service.impl;

import cn.dt70.dao.aqbEntityorder.AqbEntityorderMapper;
import cn.dt70.pojo.AqbEntityorder;
import cn.dt70.service.AqbEntityorderService;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
@Service
public class AqbEntityorderServiceImpl implements AqbEntityorderService {

    private static final Logger LOGGER = Logger.getLogger(AqbEntityorderServiceImpl.class);

    @Resource
    private AqbEntityorderMapper aqbEntityorderMapper;

    @Override
    public Boolean addEntiyorderByNum(AqbEntityorder aqbEntityorder) {
        int flag = 0;
        try{
            flag =  aqbEntityorderMapper.addEntiyorderByNum(aqbEntityorder);
        }catch (Exception e) {
            //e.printStackTrace();
            LOGGER.error("addOrderById(AqbOrder aqbOrder)>>>"+e.getMessage());
        }
        if(flag > 0){
            return true;

        }else {
            return false;
        }

    }

    @Override
    public Boolean updataEntiyorder(String orderNum) {
        int flag = 0;
        try{
            flag =  aqbEntityorderMapper.updataEntiyorder(orderNum);
        }catch (Exception e) {
            //e.printStackTrace();
            LOGGER.error("addOrderById(AqbOrder aqbOrder)>>>"+e.getMessage());
        }
        if(flag > 0){
            return true;

        }else {
            return false;
        }

    }
}
